import request from "../utils/request"

export const getAllChannels=()=>{
    return request({
        method:"get",
        url:"/channels"
    })
}

//添加用户频道
export const addUserChannel=(data)=>{
    return request({
        method:"post",
        url:"/user/addChannels",
        data:data
    })
}

//删除用户指定频道
export const deleteUserChannel=(channelId,userId)=>{
    return request({
        method:"delete",
        url:"/user/channels",
        data:{
            channelId,userId
        }
    })
}